package chat

import (
	"hft/Http/Services/front/chat"
	utils "hft/Http/Utils"
	"strconv"

	"github.com/gin-gonic/gin"
)

type Chat struct{}

func (*Chat) GetLouPanInfo(c *gin.Context) {
	id, _ := strconv.Atoi(c.Query("lou_id"))
	if data, err := chat.ChatService.GetLouPanInfo(id); err != nil {
		utils.FailWithMessage(err.Error(), c)
	} else {
		utils.OkWithData(data, c)
	}
}

var ChatController = new(Chat)
